package com.zhangyj.action;

class UrlPattern {
	private String name;
	private String value;
	private int size;
	private String vars[];

	protected UrlPattern(String name, String value) {
		this.name = name;
		this.value = value;
		this.processPattern();
	}

	private void processPattern() {
		String[] p = this.value.split(",");

		this.vars = new String[p.length];
		this.size = ((((p[0]).trim()).equals("")) ? 0 : p.length);
		for (int i = 0; i < this.size; i++) {
			this.vars[i] = (p[i]).trim();
		}
	}

	protected String getName() {
		return this.name;
	}

	protected int getSize() {
		return this.size;
	}

	protected String[] getVars() {
		return this.vars;
	}
}
